class DadoPessoal < ActiveRecord::Base
  belongs_to :funcionario
  
  validates :nome_completo, :presence => true, :length => {:maximum => 100}
  validates :cpf, :presence => true, :uniqueness => true, :length => {:maximum => 11}
  validates :email, :presence => true, :uniqueness => true
  validates :horas_semanais, :presence => true, :numericality => {:greater_than => 4, :less_than => 168}
  validates_with EmailValidator
  validates_with NomeValidator
  validates_with CPFValidator
  #validates :funcionario_id, :presence => true, :uniqueness => true      
  
end
